package net.bsayiner.foreignExchange.Utilities;

import android.os.Parcel;
import android.os.Parcelable;

public class Metal implements Parcelable {

	private String goldName;
	private float buying;
	private float selling;

	public Metal() {
	}

	public Metal(Parcel source) {
		this.goldName = source.readString();
		this.buying = source.readFloat();
		this.selling = source.readFloat();
	}

	public float getBuying() {
		return buying;
	}

	public void setBuying(float buying) {
		this.buying = buying;
	}

	public float getSelling() {
		return selling;
	}

	public void setSelling(float selling) {
		this.selling = selling;
	}

	public String getGoldName() {
		return goldName;
	}

	public void setGoldName(String goldName) {
		this.goldName = goldName;
	}

	public int describeContents() {
		return hashCode();
	}

	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(goldName);
		dest.writeFloat(buying);
		dest.writeFloat(selling);
	}

	public class Creator implements Parcelable.Creator<Currency> {

		public Currency createFromParcel(Parcel source) {
			return new Currency(source);
		}

		public Currency[] newArray(int size) {
			return new Currency[size];
		}

	}
}
